package cn.lin.spring.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ServiceAImpl implements ServiceA {

    @Autowired
    ServiceB serviceB;

    @Override
    public String sayByA(String what) {
        System.out.println("--- say hi from A");
        serviceB.sayByB("haha");
        return "A";
    }
}
